package br.fatec.model.entity;

import java.io.Serializable;

import javax.persistence.Embeddable;
import javax.persistence.FetchType;
import javax.persistence.ForeignKey;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Embeddable
public class Formula_SemiacabadoId implements Serializable  {


	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(nullable=false, updatable=false, foreignKey=@ForeignKey(name="fk_formula_cod"))
	private Formula formula;
	
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(nullable=false, updatable=false, foreignKey=@ForeignKey(name="fk_semiacabado_cod"))
	private Semiacabado semiAcabado;

	public Formula getFormula() {
		return formula;
	}

	public void setFormula(Formula formula) {
		this.formula = formula;
	}

	public Semiacabado getSemiAcabado() {
		return semiAcabado;
	}

	public void setSemiAcabado(Semiacabado semiAcabado) {
		this.semiAcabado = semiAcabado;
	}
}
